Control.PanelIndex Property
Syntax
PanelIndex as Integer
If the control has been placed on a panel of a TabPanel control, it returns the panel number. The first panel is numbered 1.
If the control is not on a TabPanel, it returns zero. This property is readable; you cannot use it to move a control to another panel.